import { defineConfig } from 'tsup'

export default defineConfig({
  entry: ['src/index.ts'],
  format: ['esm'],
  splitting: true,
  sourcemap: true,
  clean: true,
  dts: true,
  minify: true,
  treeshake: true,
  target: 'es2020',
  platform: 'neutral',
  outDir: 'dist',
  external: ['body-parser', 'express'],
  cjsInterop: true,
  esbuildOptions(options) {
    options.drop = ['console', 'debugger']
  }
})